#pragma once
#include "IDUIInterface.h"
class ATL_NO_VTABLE CDUIBuffer :
					public CComObjectRootEx<CComSingleThreadModel>,
					public CComCoClass<CDUIBuffer>,
					public IDUIBuffer
{
public:
	CDUIBuffer(void);
	~CDUIBuffer(void);
	DECLARE_PROTECT_FINAL_CONSTRUCT()

	BEGIN_COM_MAP(CDUIBuffer)
		COM_INTERFACE_ENTRY(IDUIBuffer)
	END_COM_MAP()

	// IUSBuffer
public:
	STDMETHOD(SetBuffer)(const void* pData, ULONG lSize);
	STDMETHOD_(const void*, GetBuffer)();
	STDMETHOD_(ULONG, GetSize)();

private:
	byte	*	m_pBuffer;
	long		m_lSize;
	//	std::vector<byte>	m_vctBuffer;
};
